-
-
Notifications
You must be signed in to change notification settings - Fork 198
Add gsk::RenderReplay bindings manually #2184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
16cf7ee to
52c17e6
Compare
gsk4/src/render_replay.rs
Outdated
| impl RenderReplay { | ||
| #[doc(alias = "gsk_render_replay_default")] | ||
| #[allow(clippy::should_implement_trait)] | ||
| pub fn default(&mut self, node: impl AsRef<RenderNode>) -> Option<RenderNode> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think any of those need &mut self
13e5bfa to
31ed695
Compare
8e972de to
3cec3c9
Compare
gsk4/src/render_replay.rs
Outdated
| } | ||
|
|
||
| #[doc(alias = "gsk_render_replay_set_node_foreach")] | ||
| pub fn set_node_foreach<P: Fn(&RenderReplay, &RenderNode) -> bool + 'static>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| pub fn set_node_foreach<P: Fn(&RenderReplay, &RenderNode) -> bool + 'static>( | |
| pub fn set_node_foreach<P: Fn(&RenderReplay, &RenderNode) -> glib::ControlFlow + 'static>( |
I think. The return value is whether to continue or break.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* gsk_render_replay_set_node_foreach:
* @self: the replay
* @foreach: (nullable): the function to call for all nodes
* @user_data: user data to pass to @func
* @user_destroy: destroy notify that will be called to release
* user_data
*
* Sets the function to call for every node.
*
* This function is called before the node filter, so if it returns
* FALSE, the node filter will never be called.
I am not sure, but I left the code with ControlFlow for now.
sdroege
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me apart from those details
d52e5d8 to
7ed594f
Compare
Generated by temporarily adding glib:get-type to the gir file, moving the generated file to src and then - Replace the glib::wrapper macro with `struct` and `impl Drop`. - Replace from_glib_borrow with Self(ptr) - Replace to_glib_none_mut with self.0.as_mut
834d30b to
360024c
Compare
360024c to
e32fbaa
Compare
Generated by temporarily adding glib:get-type to the gir file, moving he
generated file to src and modifying the glib::wrapper macro.
This is based on top of #2183.